package com.zzxy.service.impl;

import com.zzxy.dao.impl.TeacherDaoImpl;
import com.zzxy.service.ITeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

//@Component("teacherService")
@Service
public class TeacherServiceImpl implements ITeacherService {
    @Autowired
    private TeacherDaoImpl teacherDao;

//    public TeacherDaoImpl getTeacherDao() {
//        return teacherDao;
//    }
//
//    public void setTeacherDao(TeacherDaoImpl teacherDao) {
//        this.teacherDao = teacherDao;
//    }

    //用户访问 .../teacher/add
    //mapping controller 的 addTeacher → teacherService → dao → mysql

    public void addTeacher() {
//        System.out.println("add teacher success ...");
        //all biz : crud
        //check before
        teacherDao.addTeacher();
        //ofter
    }
    public void  deleteTeacher(){

    }
    public void  updateTeacher(){

    }
}
